home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / vis082s.arc / GENTYPES.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-17  |  12KB  |  409 lines

  1. {$R-,S-,I-,D-,F+,V-,B-,N-,L+ }
  2. unit gentypes;       (* General Structures for ViSiON BBS *)
  3.  
  4. interface
  5.  
  6. uses dos;
  7.  
  8. const versionnum='0.82';
  9.       NetMailVer=1;
  10.       date='04-30-91';
  11.       lastrevision=905;
  12.       thisversioncode=1;
  13.       maxusers=30000;
  14.       maxmessagesize=100;
  15.       maxlastcallers=20;
  16.       maxtopics=10;
  17.       maxcats=10;
  18.       sectorsize=512;
  19.       numsectors=10000;
  20.       maxcatalogsize=50;
  21.       maxgroupsize=50;
  22.       maxsyslogdat=150;
  23.       maxsyslogsize=1000;
  24.       e_door=3;
  25.       e_controlbreak=9;
  26.       e_badconfig=4;
  27.       e_fatalfileerror=90;
  28.       e_files30=50;
  29.       e_nomodemdrv=2;
  30.  
  31. { All of these are extended keystroke values. }
  32.       breakoutchar=    0;   {Control-Break}
  33.       chatchar=        59;  {F1}
  34.       sysopcomchar=    60;  {F2}
  35.       sysnextchar=     65;  {F7}
  36.       timelockchar=    66;  {F8}
  37.       inlockchar=      67;  {F9}
  38.       outlockchar=     68;  {F10}
  39.       printerechochar= 114; {Ctrl-PrtSc}
  40.       availtogglechar= 30;  {Alt-A}
  41.       bottomchar=      48;  {Alt-B}
  42.       texttrapchar=    18;  {Alt-E}
  43.       sysophelpchar=   35;  {Alt-H}
  44.       notimechar=      37;  {Alt-K}
  45.       lesstimechar=    38;  {Alt-L}
  46.       moretimechar=    50;  {Alt-M}
  47.       tempsysopchar=   20;  {Alt-T}
  48.       viewstatchar=    47;  {Alt-S}
  49.       quicknukechar=   49;  {Alt-N}
  50.  
  51. type anystr=string[255];
  52.      lstr=string[80];
  53.      mstr=string[35];
  54.      sstr=string[15];
  55.      accesstype=(bylevel,keepout,letin,invalid);
  56.      availtype=(available,bytime,notavailable);
  57.      configtype=(lowercase,eightycols,linefeeds,postprompts,moreprompts,
  58.                  asciigraphics,ansigraphics,udsysop,bulletinsysop,votingsysop,
  59.                  emailsysop,doorssysop,mainsysop,databasesysop,wanted,
  60.                  showtime,vt52,fseditor);
  61.      groupclass=(publicgroup,privategroup,personalgroup);
  62.      voteset=array [1..maxtopics] of byte;
  63.      boardorder=array [0..255] of byte;
  64.      conferenceset=array[0..32] of byte;
  65.      newvote=array [1..30] of integer;
  66.  
  67. type userrec=record
  68.        handle,              (* Users Handle *)
  69.        realname:mstr;       (* Users Real Name *)
  70.        password:sstr;       (* Users Password *)
  71.        phonenum:string[10]; (* Users Phone Number *)
  72.        laston:longint;      (* Last Call date in DATEPACK form *)
  73.        numon,               (* Total Calls *)
  74.        timetoday,           (* Time left today *)
  75.        nup,                 (* G-File Uploads *)
  76.        ndn,                 (* G-File Downloads *)
  77.        nbu,                 (* Messages posted *)
  78.        uploads,             (* Uploads *)
  79.        downloads:integer;   (* Downloads *)
  80.        totaltime:real;      (* Total Time spent on system by user *)
  81.        voted:voteset;       (* What the user voted on *)
  82.        udlevel,             (* File Level *)
  83.        udpoints,            (* File Points *)
  84.        level,               (* Main Access Level *)
  85.        emailannounce,       (* Sector for Email Announcement "-1" if none *)
  86.        beepedpwd,           (* Reserved *)
  87.        infoform,            (* Location for Infoform #1 *)
  88.        glevel,              (* G-File Level *)
  89.        gpoints:integer;     (* G-File Points *)
  90.        regularcolor,        (* The following are the users colors. *)
  91.        promptcolor,
  92.        statcolor,
  93.        inputcolor,
  94.        displaylen,
  95.        menuboard,
  96.        menuback,
  97.        blowboard,
  98.        blowinside:byte;
  99.        config:set of configtype;   (* Various config stuff, i.e. Ansi, etc *)
  100.        newscanconfig,              (* Various stuff dealing with message
  101.                                       bases. Do not mess with these. *)
  102.        access1,
  103.        access2:set of byte;
  104.        usernote,                   (* Account Note [Public] *)
  105.        macro1,                     (* Predefined user macros *)
  106.        macro2,
  107.        macro3:mstr;
  108.        upkay,                      (* Upload K *)
  109.        dnkay:longint;              (* Download K *)
  110.        lastbaud,                   (* Last baud rate used *)
  111.        lastlevel,                  (* Last main access level *)
  112.        lastxfer,                   (* Last File Level *)
  113.        lastxferpts:integer;        (* Last File Points *)
  114.        confset:conferenceset;      (* Array [1..32] of byte for the
  115.                                       sub-conferences *)
  116.        hackattempts:integer;       (* Password Hack Attempts *)
  117.        revision:integer;           (* Last Revision Number *)
  118.        lastposts,                  (* Last total messages in system *)
  119.        lastfiles:word;             (* Last total files in system *)
  120.        infoform2,                  (* Location of Infoforms 2-5 *)
  121.        infoform3,
  122.        infoform4,
  123.        infoform5:integer;
  124.        lastread:array [0..255] of word;        (* Message Stuff *)
  125.        expdate:longint;             (* Expiration date in DATEPACK form *)
  126.        timebank:integer;            (* Time stored in Time Bank *)
  127.        lastcalno:word;              (* Last Caller Number *)
  128.        udratio,                     (* Individual Upload/Download Ratio *)
  129.        udkratio,                    (* Individual U/D K Ratio *)
  130.        pcratio:integer;             (* Individual Post/Call Ratio *)
  131.        avatar:byte;                 (* 0=Normal ansi, 1=Pull Down Windows,
  132.                                        2=Avatar (not implemented yet) *)
  133.        timelimits:integer;          (* Daily time limit (0 means normal) *)
  134.        Conf:Array [1..5] of Boolean;   (* Main Conference Flags *)
  135.        LastConf:Byte;                  (* Last Conference user was in *)
  136.        SpecialSysopNote:Mstr;          (* Special Sysop Note *)
  137.        MenuHighlight,statusboxcolor:Byte;
  138.        LastGfiles:Word;
  139.        prompttype:integer;
  140.        NewVoteYes,NewVoteNo:integer;
  141.        newvoteit:newvote;
  142.        nuv1,nuv2,nuv3,nuv4,nuv5,nuv6,nuv7,nuv8,nuv9,nuv10:lstr;
  143.        use1,use2,use3,use4,use5,use6,use7,use8:BooLean; (* Config File Listings *)
  144.        YourPrompt:string[255]; (* User Defined Prompt *)
  145.        MsgHeader:integer; (* ANSi Header or Boxed ANSi Header *)
  146.   end;
  147.  
  148.      registerrec = record
  149.        sysop:mstr;
  150.        boardname:lstr;
  151.        serial:sstr;
  152.      end;
  153.  
  154.      userspecsrec=record
  155.        name:String[34];
  156.        Expired:Boolean;
  157.        minlevel,maxlevel,minlaston,maxlaston:integer;
  158.        minpcr,maxpcr:real
  159.      end;
  160.  
  161.      boardrec=record
  162.        boardname:mstr;
  163.        sponsor:string[34];
  164.        echo:Byte;
  165.        level,autodel:integer;
  166.        shortname:sstr;
  167.        conference:byte
  168.      end;
  169.  
  170.      Newsrec=Record
  171.         Location:Integer;
  172.         Level:Integer;
  173.         From:mstr;
  174.         When:longint;
  175.         Title:String[28];
  176.         MaxLevel:Integer;
  177.       End;
  178.  
  179.      BulRec=record                (* Message Header Record *)
  180.         leftby,leftto:String[30];
  181.         title,status:String[30];
  182.         when:longint;
  183.         where:lstr;
  184.         where2:lstr;
  185.         version:byte;
  186.         anon,recieved:boolean;
  187.         line,plevel:integer;
  188.         id:word;
  189.         cnet,fidonet,flag3,flag4,flag5,flag6,flag7,flag8:boolean;
  190.         realname:String[30];
  191.      end;
  192.  
  193.      NodeNetRec=Record                 (* Node List Record *)
  194.          Pass:Mstr;
  195.          Name:Mstr;
  196.          Phone:string[12];
  197.          Baud:Word;
  198.          LastDate:Longint;
  199.          Celerity,Fido,Cnet,Flag4,Flag5,Flag6:Boolean;
  200.          Node:string[10];
  201.          BaseSelection:Array[1..255] of boolean;
  202.      end;
  203.  
  204.      rumorrec=record
  205.       title,author,author2:mstr;
  206.        rumor:lstr;
  207.        when:longint;
  208.        level:integer;
  209.      end;
  210.  
  211.      mailrec=record
  212.        title,sentby:mstr;
  213.        when:longint;
  214.        anon,read:boolean;
  215.        sentto,line,fileindex:integer
  216.      end;
  217.  
  218.      abrec=record
  219.        title,fname:lstr;
  220.        level:integer;
  221.        when:longint
  222.      end;
  223.  
  224.      catalogrec=record
  225.        nummail,additional:integer;
  226.        mail:array [1..maxcatalogsize] of mailrec
  227.      end;
  228.  
  229.      grouprec=record
  230.        name:mstr;
  231.        class:groupclass;
  232.        creator,nummembers:integer;
  233.        members:array [1..maxgroupsize] of integer
  234.      end;
  235.  
  236.      message=record
  237.        text:array [1..maxmessagesize] of lstr;
  238.        title:mstr;
  239.        sendto:mstr;
  240.        note:mstr;
  241.        anon:boolean;
  242.        numlines:integer
  243.      end;
  244.  
  245.      NetPostRec=Record                (* Net Mail Package Record *)
  246.        NetIdNum:Byte;
  247.        BulletinRec:BulRec;
  248.        MessageRec:Message;
  249.      End;
  250.  
  251.      topicrec=record
  252.        topicname:lstr;
  253.        numvoted,addlevel:integer;
  254.        mandatory:boolean
  255.      end;
  256.  
  257.      choicerec=record
  258.        choice:lstr;
  259.        numvoted:integer
  260.      end;
  261.  
  262.      lastrec=record
  263.        name:mstr;
  264.        callnum:longint;
  265.        when:longint;
  266.        lastbps:integer
  267.      end;
  268.  
  269.      buffer=array [1..sectorsize] of char;
  270.  
  271.      baserec=record
  272.        numcats,numents,level:integer;
  273.        basename:mstr;
  274.        conference:byte;
  275.        echomail:boolean;
  276.        catnames:anystr
  277.      end;
  278.  
  279.      entryrec=record
  280.        data:anystr;
  281.        when:longint;
  282.        addedby:integer
  283.      end;
  284.  
  285.      parsedentry=array [1..maxcats] of anystr;
  286.  
  287.      udrec=record
  288.        sentby:mstr;
  289.        when,whenrated:longint;
  290.        filename:sstr;
  291.        path:string[50];
  292.        points:integer;
  293.        filesize:longint;
  294.        descrip:lstr;
  295.        downloaded:integer;
  296.        sendto:mstr;
  297.        pass:sstr;
  298.        newfile,specialfile:boolean
  299.      end;
  300.  
  301.      arearec=record
  302.        name,xmodemdir:lstr;
  303.        sponsor,pass:mstr;
  304.        conference:byte;
  305.        uploadhere,downloadhere:boolean;
  306.        level:integer
  307.      end;
  308.  
  309.      windowrec=record
  310.        x1,y1,x2,y2,
  311.        cx,cy,color:byte
  312.      end;
  313.  
  314.      fib=textrec;
  315.  
  316.      bbsrec=record
  317.         name,leftby:mstr;
  318.         baud:string[4];
  319.         phone:string[12];
  320.         ware:sstr
  321.     end;
  322.  
  323.      doorrec=record
  324.        name:mstr;
  325.        level,numused,info:integer;
  326.        batchname:lstr;
  327.        getparams:boolean;
  328.      end;
  329.  
  330.      minuterec=record
  331.        started:boolean;
  332.        startedat:integer;
  333.        total:real
  334.      end;
  335.  
  336.      logrec=record
  337.        menu,subcommand:integer;
  338.        param:string[41];
  339.        when:longint
  340.      end;
  341.  
  342.      syslogdatrec=record
  343.        menu,subcommand:integer;
  344.        text:mstr
  345.      end;
  346.  
  347.      gfilerec=record
  348.         gfiledescr:string[75];
  349.         sentby:string[30];
  350.         path:string[50];
  351.         fname:string[30];
  352.         filesize:longint;
  353.         when:longint;
  354.         downloaded:integer;
  355.         arcname:lstr;
  356.         specialfile,newfile:boolean;
  357.      end;
  358.  
  359.      netnode=record
  360.         name,phone:mstr;
  361.         baud:word;
  362.         note:lstr;
  363.      end;
  364.  
  365.      gfilearea=record
  366.         name:lstr;
  367.         gfiledir:string[49];
  368.         sponsor:string[30];
  369.         level:integer;
  370.         upable:boolean;
  371.         defarc:sstr;
  372.      end;
  373.  
  374. (*     MenuType=Array[1..24] of Mstr;
  375.  
  376.      LRMenuType=Array[1..4] of Mstr;     Pull Down Windows Commented *)
  377.  
  378.      Protorec=record
  379.        key:char;
  380.        desc:string[35];
  381.        cline:string[100];
  382.        exename:string[35];
  383.      end;
  384.  
  385.      baudratetype=(b110,b300,b450,b600,b1200,b2400,b4800,b9600,b19200,b38400,b57600);
  386.      baudset=set of baudratetype;
  387.  
  388. const baudarray:array [b110..b57600] of word=
  389.                  (110,300,450,600,1200,2400,4800,9600,19200,38400,57600);
  390.       versioncodes:array [1..thisversioncode] of string[4]=
  391.         ('1.00');
  392.  
  393.  
  394. const firstbaud=b110;
  395.       lastbaud=b57600;
  396.  
  397. var registo,registb:mstr;
  398.     matrix:anystr;
  399.     totalsent:longint;
  400.     totalrece:longint;
  401.     confilesa:word;
  402.     notvalidas,usedvmode:boolean;
  403.     crazychat:BooLeaN; (* Multiple Chat Colors *)
  404.  
  405. implementation
  406.  
  407. begin
  408. end.
  409.